A coherent microwave interface for manipulation of single optical photons