Yup ... you can most certainly do this as transiting NRT is pretty easy.
If you're interested in spending a little time in Tokyo and just want to be in one of the first few scheduled United 787 flights, though, United has a great fare sale going on for the DEN-NRT roundtrip ... for travel between 4/1 and 4/24, United is selling B fares on that route for $980 roundtrip (minimum stay of 3 days). It nets 17,364 EQM and 14,470 RDM ... and because it's a B fare, you can upgrade with miles without a co-pay (although the upgrade inventory is 0'd out right now).