Thanks to the demand response (DR), the system operators have a substantial opportunity to manipulate the demand side of the power system. Moreover, the system operators can easily incorporate trending technologies such as electric vehicles (EV) due to the idea of introducing improved level of controllable loads. In this study, a real-time optimization-based energy management model for an EV parking lot (EVPL) is propounded by using linear programming. The proposed algorithm offers a peak load limitation oriented DR program providing operational flexibility from the load-serving entity point of view together with the objective of maximizing the load factor of the EVPL in daily operation. Because of the mobility of the EVs, uncertain arrival/departure times along with the state-of-energy levels upon their arrival are generated by considering historical data to ensure a more realistic approach. In order to prove the validness of the suggested optimization model, a bunch of case studies is performed. Besides, credible results and useful findings are found out by activating the propounded model.