The latter. Instantaneous power is I2R or V2/R. You can average the power to get the...well, average power. If you want to figure the power as a simple function of V and R, you need Vrms not Vavg. For a 50% duty cycle with a top voltage of V and a bottom of 0, Vrms equals (sqrt(V2/2) (literally the root of the mean of the square). Apply your power formula to that and R and it should all fall into place.