Terahertz radiation from ultrahigh-speed field-effect transistors induced by ultrafast optical gate switching