Optimal Control Problems in Transport Dynamics