A man is in hospital after being shot by the US Secret Service near the White House after a confrontation with law enforcement, officials say.