We demonstrate that the presence of charges around a semiconductor quantum dot (QD) strongly affects its optical properties and produces nonresonant coupling to the modes of a microcavity. We show that, besides (multi)exciton lines, a QD generates a spectrally broad emission which efficiently couples to cavity modes. Its temporal dynamics shows that it is related to the Coulomb interaction between the QD (multi)excitons and carriers in the adjacent wetting layer. This mechanism is suppressed by the application of an electric field, making the QD closer to an ideal two-level system.