Ya sure the t-mobile sim will work freely in samsung d800i mobile without any problem sure you can use web,instant messenger and so on only if the phone is unlocked or else already locked with t-mobile else if the phone is locked to some other network provider then it wont accept t-mobile sim until you unlock it ...You can easily unlock your phone using sites like
Unlocking4U.com here they are rendering network unlock code for all mobile models at reliable cost .You first check that whether the code is available for your country and network provider ...If yes then pay for it and unlock your phone then freely use it with any GSM sim ....