The electronic band structure and density of states of (8,8) armchair and (14,0) zigzag single walled carbon nanotubes (SWCNT) are investigated using densityfunctional calculations. The band structure of the pure (14,0) zigzag nanotube indicates that it is a semiconductor where as the band structure of pure (8,8) armchair tube exhibits metallic behavior. When a titanium chain is adsorbed on the carbon nanotube, the (14,0) zigzag tube changes from semiconductor to metal and the (8,8) armchair tube transforms from metal to semiconductor. In both the cases there is a net transfer of charge from the metal chain atom to the carbon atom. The delocalized 3d electrons from the titanium chain generate additional states in the band gap regions of the semiconducting tubes transforming them into metals. The band structures of Ti adsorbed nanotubes are completely different from that of pure nanotubes. The band structure results are used to study the superconducting behaviour of pure (8,8) armchair nanotube and the Ti adsorbed (14,0) zigzag nanotube. The superconducting transition temperatures, Tc, for the pure (8,8) nanotube and the Ti adsorbed (14,0) nanotube are computed for different values of Debye temperature. The electron-phonon interaction and superconducting transition temperature are small in (8,8) armchair tube and considerable in Ti adsorbed (14,0) zigzag tube. Based on this, we hint at room temperature superconductivity in carbon nanotube.