A state visit to the UK by American President Donald Trump should be possible if it shores up US support for Ukraine, First Minister John Swinney has said.