When I'm on one of my melee builds, I simply pretend archers don't exist. My sheer disbelief powers me through to get to locations unthinkable by people who are concerned with avoiding arrows, thus lending me easy kills to people who were expecting to have their backs covered by archers. If I'm shot to death beforehand, I assume it was because of a natural disaster like one member of LLJK already mentioned in this thread. Hell this one time I saw a group of 4 archers, but since I couldn't see how they could possibly have been any danger to me I simply approached them backwards. That is, I turned around and S-keyed my way towards them. I did not get shot at all until I turned around to kill two of them.
(It's much the same way Cyranule doesn't believe lances on a horse exist - he still tries to do the turn around jump stab against them that was so effective when he was a two-hander with his tiny little espada and always gets couched for his troubles. Often when this happens you can hear him complaining in vent how his character died of a heart attack mid-air for no reason.)
The thing is, bows are pathetic. I started doing this with the standard 24/15 two-hander build (5 IF, 8 PS, 5 ath, 5 WM) but figured walking was boring as hell so I rerolled my skip to 30 Marie Anne to 21/15 ( 7 IF, 7 PS, 5 ath, 5 riding, 5 WM) and became even more resistant to arrows, in nothing but a cavalry robe. That's super light armor, and it takes like a bajillion arrows to kill me. Archers might as well become nonexistance if you wear any sort of armor whatsoever. Oh friendly archer shot me in the back thus lending the bec de corbin user an opening to one-shot me? Not the archer's fault, it was clearly polestun and polearms should be nerfed to hell, period. Fucking pikes.
--
Oh wait there's more! When I get really bored I sometimes drop this mindset and play an archer. I don't play to be one of these other useless archers pointlessly shooting at targets they can't actually kill, I go purely for tin cans. Longbow with 18/21 163 proficiency (6 PD 7 ath 7 WM 3 IF), I dropped Ryden once charging around on a horse in full plate in 3 shots with this. Sure it doesn't have the most power, but with pierce damage you don't really need more powerdraw. More WPF in my opinion is more important because I can shoot about as fast as a typical war bow user, and am even more accurate than the old standard 15/24 melee hybrid archer build with only 155 WPF in archery. It's so accurate in fact I can comfortably go for headshots, rather than body shots. Shoot for the rider, not the horse. This has been the only archer build where I could comfortably maintain a positive KDR.
Sure I have absolutely nothing to help me survive in a melee (apart from like what 6 wpf in one-hander) but because everyone runs around with a bec de corbin these days I can simply run around with my 7 athletics to look for one and then murder people with it if they still feel like approaching. (they always do >=D)
--
Long story short Gov, don't let people tell you what to do. Fuck 'em all, just fire away. If there's a 50/50 chance you have to hit the enemy as well as your ally, I say shoot. If you kill the enemy, great! If you get your ally killed, just think of yourself as incredibly amusing. Whatever you do, don't stop to freaking apologize while theres a bloody wall of tin cans charging straight at you, kill them first! Or run, but seriously it slightly annoys me when someone TKs me and then gets killed in the middle of apologizing for their actions. Goddammit you could have avenged me! Anyway I say shoot because I get TKed in melee far more than I get tked by friendly arrows, and that count includes getting my blocks interrupted.
Anyway, unless your ally is a superhero and can't possibly lose the fight, you should in all honesty just go for the shot. You're trying to hit the enemy, you are just plain going to succeed at hitting the enemy more times than you hitting your ally so it makes mathematical sense to just go for it. Granted, it's all about the context of the thing but fuck people who complain about getting shot into melee.