Can I use #10 wire for a 30A, 240V pump circuit?
10 gauge is larger than 12 gauge.  If you meant "can I use the smaller one coz it's cheaper", the answer to that is pretty universally no, but you don't need us to tell you that. 

The distance might be a factor that might call for going with a larger wire (that would be #8 or #6). But if your pump is recommending the 30A breaker, its draw is certainly somewhat less due to the 125% derating requirement -- its draw is probably 19-23A. (still, too much for #12 wire). You don't need to care about voltage drop at the 30A breaker trip.  You need to worry about it for actual working current of worst-case 23A.  At that particular distance and #10 wire, your voltage drop will certainly be around 3%, which will even make the wire salesman happy.  

Wire salesmen want you to be around 3% voltage drop on any wiring run.  But Code doesn't require anything like that, so they're just saying it to push wire.  Code gets concerned when drop gets around 8%. I bet this is a homerun, so all the voltage drop will be in this cable. This drop may be something like 3.17%, and voltage drop calculators online will say "that is over 3% therefore unacceptable" but that's silly.