This paper presents a technique for the lane keeping and the longitudinal speed control of an autonomous vehicle with the combination of an MPC and a PID control. The goal of the proposed control method is to minimize the lateral deviation and relative yaw angle with respect to the planned trajectory, while driving the vehicle at the highest acceptable longitudinal speed. The reference profile of the longitudinal speed is computed considering both the lateral and longitudinal dynamic of the vehicle. The vehicle is represented by means of a linear 3-DoF bicycle model. The control algorithm takes the road lane boundaries as the only external input. The proposed strategy is validated in simulation on three distinct driving scenarios.