Text this: An Efficient Pseudospectral Method for Solving a Class of Nonlinear Optimal Control Problems