Control of the optical field coherence by spatiotemporal light modulation