Low-power and electrically controlled optical sources are vital for next generation optical interconnect systems to meet strict energy demands. Current optical transmitters consisting of high-threshold lasers plus external modulators consume far too much power to be competitive with future electrical interconnects. Here we demonstrate a directly modulated photonic crystal nanocavity light-emitting diode (LED) with 10 GHz modulation speed and less than 1 fJ per bit energy of operation, which is orders of magnitude lower than previous solutions. The device is electrically controlled and operates at room temperature, while the high modulation speed results from the fast relaxation of the quantum dots used as the active material. By virtue of possessing a small mode volume, our LED is intrinsically single mode and, therefore, useful for communicating information over a single narrowband channel. The demonstrated device is a major step forward in providing practical low-power and integrable sources for on-chip photonics.