  We develop a three-dimensional theory for quantum memories based on light
storage in ensembles of Lambda-type atoms, where two long-lived atomic ground
states are employed. We consider light storage in an ensemble of finite spatial
extent and we show that within the paraxial approximation the Fresnel number of
the atomic ensemble and the optical depth are the only important physical
parameters determining the quality of the quantum memory. We analyze the
influence of these parameters on the storage of light followed by either
forward or backward read-out from the quantum memory. We show that for small
Fresnel numbers, the forward memory provides higher efficiencies, whereas for
large Fresnel numbers, the backward memory is advantageous. The optimal light
modes to store in the memory are presented together with the corresponding
spin-waves and outcoming light modes. We show that for high optical depths such
Lambda-type atomic ensembles allow for highly efficient backward and forward
memories even for small Fresnel numbers $F\gtrsim 0.1$.
