You must complete the Forest Temple before the Water Temple.
You must complete the Forest Temple and the Water Temple before the Spirit Temple.
You must complete the Forest, Fire, and Water Temples before the Shadow Temple.
Therefore, the possible orders are:
Forest, Fire, Water, Shadow Spirit...