We investigate the spectroscopic optical properties of gamma-ray sources detected with high significance above 50 GeV in the Third Catalog of Hard Fermi-LAT Sources and that are good candidates as TeV emitters. We focus on the 91 sources that are labelled by the Fermi team as BL Lac (BLL) objects or blazar candidates of uncertain type (BCUs), are in the Northern hemisphere, and are with unknown or uncertain redshift. We report here on GTC (Gran Telescopio Canarias) spectra (in the spectral range 4100-7750 Å) of 13 BCUs and 42 BLL objects. We are able to classify the observed targets as BLL objects and each source is briefly discussed. The spectra allowed us to determine the redshift of 25 objects on the basis of emission and/or absorption lines, finding 0.05 < z < 0.91. Most of the emission lines detected are due to forbidden transition of [O III and [N II]. The observed line luminosity is found to be lower than that of quasi-stellar objects (QSOs) at similar continuum and could be reconciled with the line-continuum luminosity relationship of QSOs if a significant beaming factor is assumed. Moreover, for five sources we found intervening absorption lines that allow to set a spectroscopic lower limit of the redshift. For the remaining 25 sources, for which the spectra are lineless, a lower limit to z is given, assuming that the host galaxies are giant ellipticals.