Aircraft Electric Power Systems (EPS) route power from generators to vital avionic loads by configuring a set of electronic control switches denoted as contactors. In this paper, we address the problem of designing a hierarchical optimal control strategy for the EPS contactors in the presence of system faults. We first formalize the system connectivity, safety and performance requirements in terms of mathematical constraints. We then show that the EPS control problem can be formulated as a Mixed-Integer Linear Program (MILP) and efficiently solved to yield load shedding, source allocation, contactor switching and battery charging policies, while optimizing a number of performance metrics, such as the number of used generators and shed loads. This solution is then integrated into a hierarchical control scheme consisting of two layers of controllers. The high-level controller provides control optimality by solving the MILP within a receding horizon approach. The low-level controller handles system faults, by directly actuating the EPS contactors, and implements the solution from the high-level controller only if it is safe. Simulation results confirm the effectiveness of the proposed approach.