Control over the transverse structure and long-distance fiber propagation of light at the single-photon level