How can I set the linearVelocity so that the object travels a specific distance with python?
Use velocity=distance/time, in your case velocity=30/0.25=120 BU/s however the blender game engine units are BU/game-frame (default=60) therefore the correct value would be 2 BU/game-frame. To make the object travel 120BU/s on the local Y-axis, I believe you need to use (assuming default game-frame): 

setLinearVelocity((0.0,120.0,0.0),True)

EDIT: Apparently the units are BU/s