Self-focusing of laser beams in the beat-wave accelerator