Real-Time On-Ramp Merging Control of Connected and Automated Vehicles using Pseudospectral Convex Optimization