On the emission of gamma rays by young pulsars