Optical frequency scanning without deflection using an acoustooptic modulator