Optimal Design of Multi-Phase Materials