It is physically possible, but not recommended due to the fact it is 3.5 hours each way by train. Venice is best seen in the evening after the day trippers have left, in my opinion. Look at Trenitalia's website for the train schedules.
Hardly seems worth a 7 hour + journey (adding in time to get to the train station from your hotel, etc) to spend a few hours in Venice, particularly when there are so many other options for a day trip from Rome. Have you been to Florence (1 hr 20 minutes on the fast train from Rome) or Naples (just over an hours journey)?
While I love Venice it seems like quite a long trip for a day (if you don't stay overnight).