Deep-nanometer-scale terahertz spectroscopy using a transistor geometry with metal nanogap electrodes