High-quality electron beam with nonadiabatic electrostatic pumping