The answer to your question is... yes and no.
As far as shooting through your teammates, you can do this -- somewhat. Depending on where you hit your allies, the shots will, in fact, go through. If you hit your allies in their arms or parts of their legs, the shots will go through and hit whatever is on the other side. Attempting to fire shots through their upper or lower torso will stop the bullets however.
To test this, aim at the ground through an ally's arm or the edge of their leg. You'll notice when you squeeze off a round, the shot will visibly ricochet off the ground. Depending on the surface, you'll see sparks or dirt appear. If you attempt to do this through their upper or lower torso, the "ricochet" effect will not appear, e.g. the round did not make it through the ally's model.
Assuming you can get an ally's arm or leg to line up between your gun and an enemy, your shot will, in fact, damage the enemy. It's just more effective to actually see what you're hitting, obviously.