The Dark Matter Time Projection Chamber (DMTPC) collaboration is developing a low pressure gas TPC for detecting Weakly Interacting Massive Particle (WIMP)-nucleon interactions. Optical readout with CCD cameras allows for the detection of the daily modulation of the direction of the dark matter wind. In order to reach sensitivities required for WIMP detection, the detector needs to minimize backgrounds from electron recoils. This paper demonstrates that a simplified CCD analysis achieves $7.3times10^{-5}$ rejection of electron recoils while a charge analysis yields an electron rejection factor of $3.3times10^{-4}$ for events with $^{241}$Am-equivalent ionization energy loss between 40 keV and 200 keV. A combined charge and CCD analysis yields a background-limited upper limit of $1.1times10^{-5}$ (90% confidence level) for the rejection of $gamma$ and electron events. Backgrounds from alpha decays from the field cage are eliminated by introducing a veto electrode that surrounds the sensitive region in the TPC. CCD-specific backgrounds are reduced more than two orders of magnitude when requiring a coincidence with the charge readout.