Is the standard shotgun still a weapon of choice in modern warfare? If it is how could be successfully used without overkill or harming fellow soldiers?
Let me put it this way, the first true military shotguns, fielded in WWI, were called trench guns. That is what they were for, clearing trenches.
Trenches aren't seen much anymore, but they are still perfect for clearing out other varieties of tight spaces filled with enemy soldiers, and yes, shotguns of various types are still a weapon of choice for such situations. Overkill is not a concern in wartime, and if allies are in the area, you would simply have to risk it or use a different weapon.
There is another reason to be using it. Modern warfare scenarios include urban areas with civilians all too often. A high velocity rifle round can and will penetrate through walls with plenty enough power left over to kill. A standard shotgun round, in many cases, will not.