If your are struggling to keep the party alive, don't do it.
Healers DPSing is meant to be a bonus on top of great healing. If it results in your partymembers dying, you didn't give heals enough priority.

For example: If I see that one heal only gets the tank up by a small portion of HP and every hit he takes is a lot more than I can heal with one heal, even when his HP are full I won't switch to dpsing with cleric stance, because I won't be able to get his HP back up fast again and he'll keep taking dmg and eventually dying before I can even turn off cleric stance again. This mainly happens with low gear levels or when the tank is either badly equipped, doesn't know his cooldowns or overestimates himself by pulling too many mobs.
But when I know I have big heals available, and even something like 1 heal is enough to fill over 50% of the tank's HP up, I'll dps away instead of standing around staring at walls and others doing stuff.

So yeah, just keep in mind that even if people want you to dps, your first and foremost job is to keep everyone alive and well. Only dps when you are sure you can afford it.
Also, yes, there are quite a few people who expect healers to dps. But if you don't feel safe doing it (for example because your DPS always stand in AoEs and stuff, nearly dying and you have to stay ready to heal them) just be honest and tell them it's their own fault you can't dps >:3