But calibre will convert your HTML 4.01 internally to XHTML 1.1 Strict and use that for the .epub creation.
You should open the resulting .epub (with zip, winzip or winrar) and see exactly what changes calibre applied. Then you can try to "fix" your HTML to find a better work-around.
I too like using a single HTML source file to then produce many different ebooks formats from. See
Creating multiple ebook formats from same source files! or the Perl code used with
GuteBook - the Project Gutenberg eBook Maker/Front-end for my efforts thus far.