You can substitute the gin with vodka if desired. Be sure you use dry vermouth, which is the white kind (not sweet, which is normally red).
There’s a long debate on whether or not you should stir or shake a dirty martini. Whether you choose to use a chilled martini glass or to serve it on the rocks - it’s ultimately up to you. Gently shaking it in a cocktail shaker with ice chills the ingredients further, but if you like your martinis warmer then by all means go the route of stirring it in a glass with a long cocktail spoon. Either way will work!