Sure. If the you apply 5 volts to the "ground pin" of an LED, it will turn off. So if you PWM the ground pin, the higher the value passed to analogWrite() (i.e. the more time that the pin is at 5 volts), the dimmer the LED will be. Just leave the shared power pin at 5 volts the whole time.