Israel has said it "deeply regrets" three deaths at Gaza's only Catholic church, adding that a "stray ammunition" hit the building.