The trenitalia site is infamous for not accepting foreign credit cards. Lots of people have also received false confirmations and then not been able to print the tickets when arriving in Italy.
Would recommend you just book upon arrival, as trains hardly ever sell out, and discounted tickets (Amica fares, etc.) are often available, even up until the day before your trip.
You can book tickets through RailEurope, but they charge a significant amount more.