President Barack Obama has said the US is prepared to work with any nation, including Russia and Iran, to resolve the conflict in Syria.