Trapped atomic ensembles are convenient systems for quantum information storage in the long-lived sublevels of the electronic ground state and its conversion to propagating optical photons via stimulated Raman processes. Here we investigate a phase-matched emission of photons from a coherently prepared atomic ensemble. We consider an ensemble of cold atoms in an elongated harmonic trap with normal density distribution, and determine the parameters of paraxial optics to match the mode geometry of the emitted radiation and optimally collect it into an optical waveguide.