  We investigate the efficiency of atom-cavity based photon-generation schemes
to deliver single photons of arbitrary temporal shape. Our model applies to
Raman transitions in three-level atoms with one branch of the transition driven
by a laser pulse, and the other coupled to a cavity mode. For any possible
shape of the single-photon wavepacket, we derive an unambiguous analytic
expression for the shape of the required driving laser pulse. We furthermore
discuss the constraints limiting the maximum probability for emitting any
desired photon, and use these to estimate upper bounds for the efficiency of
the process. The model is not only valid for Vacuum-Stimulated Raman Adiabatic
Passages (V-STIRAP) in the strong-coupling and bad-cavity regime, but it
generally allows controlling the coherence and population flow in any Raman
process.
