A number of black hole X-ray transients show quasi-periodic oscillations (QPOs) in the optical (ultraviolet) and X-ray bands at the same frequency, which challenge models for production of radiation at these wavelengths. We propose a model where the optical radiation is modulated by the oscillating X-ray flux resulting in varying irradiation of the outer parts of the accretion disc. The proposed QPO mechanism inevitably takes place in the systems with sufficiently small ratio of the outer disc radius to the QPO period. We show that, unlike in the case of the aperiodic variability, it is not possible to obtain the optical QPO profiles from those observed in the X-rays through the transfer function, because of different X-ray signals seen by the disc and by the observer. We demonstrate that with the increasing QPO frequency, occurring at the rising phase of the X-ray outburst, the rms should be constant for sufficiently low frequencies, then to increase reaching the peak and finally to drop substantially when the QPO period becomes comparable to the light-crossing time to the outer disc. We predict that the QPO rms in this model should increase towards shorter wavelengths and this fact can be used to distinguish it from other QPO mechanisms.