Synthesis of nanoporous metal oxides