President Donald Trump has told Israeli lawmakers their country has no more to achieve on the battlefield and must work toward peace.