It is possible with your current setup.
//initiates Optimizely code if it's been loaded, if not queue the function calls in a JavaScript array.
window.optimizely = window.optimizely || [];
//takes the string for donationAmount variable, replaces the $, converts to string, and multiplies by 100
var totalPrice = Number(donationAmount.replace(/\$|,/g, '')) * 100;
//pushes event to optimizely with total.
window.optimizely.push(['trackEvent', 'thankYouPage', {
'revenue': totalPrice
}]);
You'll also need to set up two goals:
Custom event (responsible for getting the event into optimizely)
Revenue (for seeing revenue in your experiment)