You have a few options:
1. Jailbreak the iPhone and use it as an iPod Touch until your contract is up, then switch to AT&T.
2. Unlock the iPhone and use it with T-Mobile SIM card from your other phone until your contract is up, then switch to AT&T (if you even decide to switch at the end).
3. Buy an iPod Touch instead of an iPhone, if you don't really need the phone feature.
4. Wait out your contract with your T-Mobile phone, then buy the iPhone and legitimately activate it on AT&T the day you get it.
Technically, options 1 and 2 are obviously the best on the surface, since you get to use the iPhone right away, however, you void the warranty by hacking the phone (doesn't matter if you unlock it or not, technically jailbreaking is sufficient to void the warranty since it's an unauthorized modification, although in either case both the current jailbreak and software unlock are easily reversible at the moment by an iTunes restore to 1.1.3, but you're still taking that chance, if some hardware problem occurs while the phone is hacked and you can't restore, you're screwed).