Israeli Prime Minister Benjamin Netanyahu will go into hospital to have his prostate removed, his office has said.