45 gallon should be ok, but you'll need a glass top and not a screen one to get the humidity up to what is required. Also, the all-glass sides may or may not be good as they are pretty shy. Think of where they come from. Deep, dark, dank rainforests in S. America. They like to hide in moist, warm (but not too warm) and dark places. You'll never see it out in the open during the day (unless you make it have no hide box or crank the temps too high). But come 8:00pm, Rainbows spring to life!! Its pretty cool.
Ok, enough jibber-jabber. 45 gallon would be ok, Rainbows are pretty much bullet-proof, so as long as you have the right humidity and the right temps (85F warm end, 75-80F cold end) you'll be fine (and so will the snake!). The only problem I see is if you get a monster one. I have a 7-footer that would simply not live comfortably in a 45 gallon tank. I do have a 4-foot one that's 6 years old and it would do just fine. Again, it depends on which snake you get.
Hope it helps, 'cause now I'M confused!!