A Palestinian man has been shot by Israeli forces following an alleged stabbing attack.