Attosecond control of optical waveforms