Depends on the size of the tank and the size of the shrimps.
In general I would say yes, if the tank is large enough. I would also say the shrimp should have about the same final size, same goes for the goby.
The space the shrimp (and goby) will require depends also on their sizes. I have a pair of Alpheus randalli that lives with a pair of Stonogobiops nematodes (high fin gobies) and they claim about as much as a dinner plate. Though their area is restricted by the rock structure they live underneath. The restriction is by the open bottom area around the rocks.
Now, larger shrimp like the tiger pistol shrimp will claim more space and may also be more difficult to contain to a small area, let alone the damage they can do to the tank. I had a pretty big specimen that moved a lot of gravel to one corner of the tank to build his little fort. While amusing it caused quite a bit of damage to the other inverts.