Yep, you can do this. You will need two little scripts, one to change to silenced and one to change to normal. Each script will have two main bits.
One bit will change round the thing in the action menu, for which you will need the
addAction command. (thinks: there must be a removeAction command as well ....)
The other bit will swap round the weapons for which you will need
addWeapon and removeWeapon .. hopefully both guns will take the same ammo so you don't need to get bogged down with ammo.
The un+official command reference guides in the Editors Depot - Tuts - References will help with info on the commands. I'm sorry I can't be more specific, I'm just making this up as I go along. Hopefully somebody will fill in some more details.