The photoluminescence of a partially suspended, semiconducting carbon nanotube that forms the active channel of a field-effect transistor is quenched and red-shifted upon application of a longitudinal electrical (source-drain) field. The quenching can be explained by a loss of oscillator strength and an increased Auger-like nonradiative decay of the E11 exciton. The spectral shifts are due to drain-field-induced doping that leads to enhanced dielectric screening. Electroluminescence due to electron impact excitation of E11 excitons is red-shifted and broadened with respect to the zero-field photoluminescence. A combination of screening and heating of the carbon nanotube can explain both spectral shift and broadening of the electrically induced light emission.