A solid-state doping technology for carbon nanotubes