Optimal Design of Microwave Photonic Crystal based Accelerators