Using an acousto-optic modulator as a fast spatial light modulator