Generation of a single-cycle optical pulse