The best way to rewrite the sentence while maintaining correct usage of standard written English is:
D: "After we had bowed our heads, the priest in the temple led us in prayer."
This option provides clarity regarding the sequence of actions and uses the past perfect tense appropriately.
The correct option is (D): After we had bowed our heads, the priest in the temple led us in prayer.