A framework for optimal microstructural design of random heterogeneous materials