Efficient single-photon sources based on semiconductor quantum dots typically rely on resonant excitation schemes with a high degree of control. In particular, having access to continuous-wave (CW)...Show moreEfficient single-photon sources based on semiconductor quantum dots typically rely on resonant excitation schemes with a high degree of control. In particular, having access to continuous-wave (CW) and pulsed excitation without changing the center frequency is highly desirable. CW excitation is useful for alignment and characterization, while pulsed excitation is essential for on-demand single-photon production. We present a technique based on ultra-fast electro-optic modulation to directly synthesize optical pulses from a narrow linewidth CW laser. With custom-built ultra-fast electronics, we demonstrate tunable pulse lengths down to 50 ps. Pulses longer than 100 ps achieve a typical extinction ratio of 300, and the 50 ps pulses still show an extinction ratio of 150. We then use these pulses to excite a single InAs quantum dot in a micropillar cavity and show the generation of true single photons. This technique allows for full control over the experiment in the temporal-spectral domain, and is significantly simpler compared to using conventional Ti:Sa mode-locked laser oscillators in combination with grating-based pulse shaping.Show less