Would analogWrite be a good command,
With suitable MOSFET, yes. Keep in mind that the LED output is not linear. That is, an increase in PWM value from 40 to 50 will not result in the same level of perceived brightness change as an increase from 100 to 110 or from 240 to 250.