This is not really possible, because as soon as your map finishes, you are left in insert mode so you see the 'showmode' message. There are a couple of alternatives however.
a) Fancy statusline plugins like vim-airline usually also display the mode, so one does not necessarily need the option 'showmode' anymore:
b) Increase your 'cmdheight' setting to 2:
:set cmdheight=2 so that both messages can be displayed simultaneously.
Please note you can use the keyname instead of the keycode for your mapping. So in your example, you might want to use
imap <f12> <c-\><c-o>:w<cr> (note instead of using esc to return from insert mode, I used the CTRL\CTRLO to temporarily switch for one command to normal mode.