All-optical control of nonlinear focusing of laser beams in plasma beat wave accelerator