18s are optimal performance tires for handling for the M3. All timed Nurburgring runs use 18s.
First: The effect of size is more important than mass when calculating the moment of intertia. Wheels (aluminum) are much more dense than tires (rubber and steel and...). In any wheel for the M3 the outer "cylindrical" barrel portion of the wheel is the part that is the dominant contributor to the moment of intertia (I = integral r^2 dm) since it is furthest from the axis of rotation. The tires horizontal cylindrical portions (tread portions) will be rougly equal comparing 18, 19 or 20. Is is the sidewall the becomes smaller or larger, again this part of the tire is closer to the rotation axis.
Second: Tire deformation. Tires need to deform just the right amount to grip, absorb bumps without loosing traction, brake, etc. 18s are known to do this just right. 20s have way too short of a sidewall for proper lateral or vertical defection. 19s are a decent compromise between looks and performance.
These effects are fairly small but will be measurable on a timed track with a good driver.