I thought saying Trump isn't a "legitimate" president was somebody's sly way of calling him a bastard.
Some words in English have more than one definition, more than one usage.
Certainly the word "bastard" also has a definition, which has nothing to do with whether or not a person's parents were married or not, but instead is used in association with a subjective Judgment of an individual's character.
In terms of the word "legitimate", I think the Congressman is using that word to describe something illegal such as, Trump's presidency is illegitimate because the election process which is putting him in office was illegal. Therefore Trump's presidency would be not be legitimite. I think that's what Congressman Lewis is asserting in his statement.