I've just used something like convert -flatten -quality 95 file.png file.jpg
. (Without -flatten the background color would be black.)
Why do you need the -background white or +matte options?
+matte makes this image solid red: convert -size 200x200 'xc:rgba(255,0,0,0.5)' square.png
. According to the documentation, it's the same as -alpha off, which turns off the use of alpha channel data. But doesn't -mosaic remove transparency?