Methods and devices enable shaping of a charged particle beam. A modified dielectric wall accelerator includes a high gradient lens section and a main section. The high gradient lens section can be dynamically adjusted to establish the desired electric fields to minimize undesirable transverse defocusing fields at the entrance to the dielectric wall accelerator. Once a baseline setting with desirable output beam characteristic is established, the output beam can be dynamically modified to vary the output beam characteristics. The output beam can be modified by slightly adjusting the electric fields established across different sections of the modified dielectric wall accelerator. Additional control over the shape of the output beam can be excreted by introducing intentional timing de-synchronization offsets and producing an injected beam that is not fully matched to the entrance of the modified dielectric accelerator.