Minimizing Transmission Energy in Sensor Networks via Trajectory Control