Can I restore my new iPhone 5s 7.1.1 with my iphone 4s 7.0.4 itunes backup?
What happened was correct - the backup only contains your data (apps, contacts, messages, etc) not the operating system version. As your 5S had 7.1.1 installed, restoring your backup kept that iOS version but restored your data.

If you'd prefer to have iOS 7.0.4 on your 5S you'll need to install that version first (manually, using iTunes), then restore your 4S backup. You will then end up with a 5S running 7.0.4 with all your data.