The documentation indicates,
imwrite(X,map,filename,fmt) writes the indexed image in X and its associated colormap map to filename in the format specified by fmt.
The question of color scaling is thus irrelevant, as indexed images do not use color scaling.
I suspect you might want to take advantage of the File Exchange contribution "freezeColors" to convert the image into a truecolor image that you can get() the Cdata property of and imwrite() that array (with no map)