Charge control and geometric magnetoresistance of a gated AlGaAs/GaAs heterojunction transistor