Planar microcavities with distributed Bragg reflectors (DBRs) host, besides confined optical modes, also mechanical resonances due to stop bands in the phonon dispersion relation of the DBRs. These resonances have frequencies in the 10- to 100-GHz range, depending on the resonator's optical wavelength, with quality factors exceeding 1,000. The interaction of photons and phonons in such optomechanical systems can be drastically enhanced, opening a new route towards the manipulation of light. Here we implemented active semiconducting layers into the microcavity to obtain a vertical-cavity surface-emitting laser (VCSEL). Thereby, three resonant excitations--photons, phonons and electrons--can interact strongly with each other providing modulation of the VCSEL laser emission: a picosecond strain pulse injected into the VCSEL excites long-living mechanical resonances therein. As a result, modulation of the lasing intensity at frequencies up to 40 GHz is observed. From these findings, prospective applications of active optomechanical resonators integrated into nanophotonic circuits may emerge.