Controlling the surface potential of a dielectric target irradiated by an electron beam in medium vacuum