Control over few-photon pulses by a time-periodic modulation of the photon emitter coupling