An imam in Northern California who gave a widely criticized sermon last week about tensions over a holy site in Jerusalem has apologized for his remarks.