The effect of applied voltage on the formation of a subnanosecond electron beam in a gas-filled diode