A Cleric can not Turn Undead in place of performing an Attack of Opportunity.
Take note of what an AoO actually allows:
Making an Attack of Opportunity
An attack of opportunity is a single melee attack
Particularly, note that no where in the AoO description does it allow the character to take a standard action, which is what is needed to perform Turn Undead.
Turning undead is a supernatural ability that a character can perform as a standard action.
Even if Turn Undead is "considered an attack", it is still a Supernatural Ability that requires a standard action, not a "melee attack" as specified by the AoO description.
This still doesn't mean AoOs are entirely restricted to boring old roll-to-hit-and-damage actions. You can perform maneuvers like Tripping, which are explicitly melee attacks and do not specifically require a standard action to perform.