Charge carrier localization in pure and doped 1T-TaS2