You can apply for the tourist visa at the Tanzanian embassies and consulates in your country of residency. Some embassies offer the application form online, but the application process still takes time.
You need a passport valid for at least 6 months from the date when entering the country. If you are planning to enter the country on more than one occasion on this trip, then you may be able to get a multiple entry visa.
US passport holders pay 100 US$ for standard single, double and multiple entry visa. Canadian passport holders pay 75 US$. EU citizens and most other nationals pay 50 US$ or 50 €.
You can obtain the following visas in Tanzania: Burundi, Congo (Zaire), Kenya, Malawi, Mozambique, Rwanda, Uganda, Zambia, Zimbabwe.
Websites of Tanzanian embassies: