Text this: Integrated Lateral and Longitudinal Control with Optimization-Based Allocation Strategy for Autonomous Electric Vehicles