Four Palestinians have been killed by Israeli fire in two separate shootings in the West Bank and Gaza.