Controlled synthesis of transition metal/conducting polymer nanocomposites