We calculate energy spectra and mass composition of cosmic rays accelerated by the galactic population of pulsars during their radio and gamma-ray phase. It is assumed that a significant part of the pulsar rotational energy is lost on acceleration of iron nuclei extracted from the surface of the neutron star. The nuclei are accelerated, at first when passing the outer gap of the inner pulsar magnetosphere and later in the pulsar wind zone, to energies corresponding to 50% of the total potential drop through the polar cap region of the neutron star. We calculate energy spectra of the nuclei injected from the pulsar wind nebulae into the Galaxy including different energy loss processes of nuclei during their propagation in the pulsar magnetosphere and the expanding nebula, their fragmentation in collisions with radiation and matter, adiabatic energy losses, and escape from the nebula. Several models proposed for the distribution of the initial parameters of the galactic pulsar population are considered. It is shown that the best description of the observed cosmic ray spectrum and the mass composition between a few 10(15) eV and a few 10(18) eV is obtained for the model B of Lorimer et al., in which the logs of initial pulsar periods and surface magnetic fields are given by the Gaussian distributions with the average values of [log P[ms]) = 2.6 and (log B[G]) = 12.3, respectively. In order to supply the cosmic rays into the Galaxy with the required rate, the product of the efficiency of cosmic ray acceleration by pulsars and their birth rate should be about 10(-2) yr(-1).