Both will work. The rule of thumb is tire width should not exceed rim width plus 4" but many wheelers go a bit beyond that.
The 8" rim will be better for keeping the bead seated if you air down a lot off-road. It also leaves more tire to protect the rims from obstacles. On pavement, though, the narrower rim will tend to lift the outer shoulders of the tread, and you may find that the pressure needed to keep the tread flat is softer than recommended for high speed or extended driving. The 10" rims will let the tread sit flatter at normal street pressures for better tread mileage.