Realization of electrically pumped lasing with solution processable materials will have a revolutionary impact on many disciplines including photonics, chemical sensing, and medical diagnostics. Due to readily tunable, size-controlled emission wavelengths, colloidal semiconductor quantum dots (QDs) are attractive materials for attaining this goal. Here we use specially engineered QDs to demonstrate devices that operate as both a light emitting diode (LED) and an optically pumped laser. These structures feature a distributed feedback resonator integrated into a bottom LED electrode. By carefully engineering a refractive-index profile across the device, we are able to obtain good confinement of a waveguided mode within the QD medium, which allows for demonstrating low-threshold lasing even with an ultrathin (about three QD monolayers) active layer. These devices also exhibit strong electroluminescence (EL) under electrical pumping. The conducted studies suggest that the demonstrated dual-function (lasing/EL) structures represent a promising device platform for realizing colloidal QD laser diodes.