The US has called for an "immediate" ceasefire in Gaza after 40 Palestinians were reported dead in an Israeli strike at a UN-run school.