As long as you stay do not exceed the specified current of the GPIO pins, wiring it that way is correct, and it doesn't matter on which side you put the resistor: http://electronics.stackexchange.com/questions/13746/why-does-a-resistor-need-to-be-on-the-anode-of-an-ledhttps://electronics.stackexchange.com/questions/13746/why-does-a-resistor-need-to-be-on-the-anode-of-an-led
You must include the one resistor, in order to not short the two GPIO pins, as the LED has very low resistance. You can use a LED resistor calculator to determine the resistor value: http://ledcalc.com/