A google search will tell you that you need 10g wire for a 30 amp outlet. It will tell you that you need 6g for a 50 amp outlet. Since you have such a long run, I would go 2 wire sizes larger, so for a 30 amp I would run 6g, for 50 amp I would run 2g. The NEUTRAL wire should be the same size as the hot wire(s). The GROUND wire can be 10g in all cases. I would recommend that whatever you do, you run the wires for a 50 amp outlet, that means TWO hot wires, one NEUTRAL, and one GROUND. Even if you only install a 30 amp outlet today, if you ever upgrade to a 50 amp rig, the wire is ready. All you would have to do is replace the outlet and the breaker. (Bigger wire is always better, but you have to do the cost/benefit analysis.)