Integration of a gate electrode into carbon nanotube devices for scanning tunneling microscopy