Terahertz properties of mercury telluride (HgTe) films with critical thickness are presented and discussed. The density of the charge carriers is controlled using contact-free optical doping by visible light. In the magneto-optical response of HgTe the contribution of two types of carriers (electrons and holes) can be identified. The density of the electrons can be modified by light illumination by more than one order of magnitude. As the hole density is roughly illumination-independent, the terahertz response of the illuminated samples becomes purely electronic. In some cases, light illumination may switch the qualitative electrodynamic response from hole-like to the electron-like. The cyclotron mass of the electrons could be extracted from the data and shows a square root dependence upon the charge concentration in the broad range of parameters. This can be interpreted as a clear proof of a linear dispersion relations, i.e. Dirac-type charge carriers.