The optical response of superconductors with odd-frequency Berezinskii pairing is studied. By using a simple model with a parabolic dispersion law and a non-magnetic disorder, the spectral function, the electron density of states, and the optical conductivity are calculated for a few gap ansatzes. The spectral function and the electron density of states clearly reveal the gap for the Berezinskii pairing for the sufficiently strong frequency dependence of the order parameters. It is found that, similarly to the conventional BCS pairing, the odd-frequency gaps induce peaks in the real part of the conductivity, which, however, are sharper than in the BCS case. The magnitude and position of these peaks are determined by the frequency profile of the gap. The imaginary part of the optical conductivity for the Berezinskii pairing demonstrates sharp cusps that are absent in the case of the BCS superconductors. The corresponding results suggest that the Berezinskii pairing might allow for the optical transparency windows related to the onsets of the attenuation peaks in the real part of the conductivity. Thus, the study of the optical response not only provides an alternative way to probe the odd-frequency gaps but can reveal also additional features of the dynamic superconducting pairing.