It is a matter of how the writer conceives the oil-- as a single large volume or as a large number of gallons. Either verb is possible in both sentences, but for the first sentence, 'a lot of oil' (uncountable) leads us to prefer ' is ', while in the second sentence the thought of a progress of spilling oil (gallon by gallon) leads us to prefer ' were '.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.