I don't know of a way to do it in "real time" online.
You could "simulate" it like this (this is assuming you have the programming skills to do technical stuff):
1) Setup a cafepress store. Grab a blank t-shirt image (this is OK as long as you are going to use cafepress for the fulfillment)
2) Figure out how much you want to charge for the t-shirt. Figure out the shipping costs.
3) Setup your variable image program on your server to create the image on the fly and have it superimposed on the t-shirt graphic (or any other product) so the customer can buy it right from your site.
4) Set the price so you make a profit from the cafepress base price and include the shipping.
5) Setup a PayPal or Google Checkout button that allows the customer to pay you for the t-shirt.
6) Grab the customer generated graphic (high resolution version) from your server and upload it to your private cafepress store.
7) Add the graphic to product the customer ordered. If the customer ordered a t-shirt and a mug, you upload the graphic to a t-shirt and a mug.
options:
8) Make the purchase through your cafepress store at your "base price" and have it shipped directly to the customer as a "Gift" so the pricing is blanked out.
8a) Make the purchase through your cafepress store at your base price and have it shipped to you. You then repackage the shirt with your own promotional materials and ship it to the customer.
If the idea worked out and you wanted to invest a bit in the equipment (printer, heat press, maybe a cutter) you could just do all the printing and shipping yourself.
Hope this helps