Yes, you can. I've done both.
However, I should also mention that this is more of an OEM Tech post than a Mod Tech post...
The rear main seal will require that you pull the oil sump, which may be done (even on a stocker!) without dropping the front axle. The front main seal is behind the harmonic damper, which will require a HD puller and an HD installer. A 1/2"-20 bolt and a stack of washers may be used in place of the latter - DO NOT improvise on the first.
You might want to take a good look at your HD. If the elastomer band is starting to squidge out from between the hub and the ring, might as well replace it anyhow - you'll be taking it off anyway.
I believe I've written up both jobs on here in the recent past, you might want to search for my posts on the subject to see if you can't save yourself some trouble and some brain pain...
5-90