Bear in mind that with soft backpacks, it is often more about the "appearance" and proportions than the exact physical size.
The bag that I have taken around the world a few times now is the Deuter Transit 50L + 10L daypack:
Due to the proportions of the bag, I think it's highly unlikely that it will ever easily qualify for carry on because of the height of it. The height is the quickest way that makes a backpack "look" big and will often get your bag measured.
I love the quality and the features of the Deuter bags, my girlfriend has a Traveller 55L + 10L and hers is awesome as well but I think you are on the right track with a 40L being about the maximum you will get on a plane in carry on.
If there is one bit of advice, it is DO NOT BUY ONE ONLINE. The suspension options between manufacturers and even models vary hugely and what seems like a great bag might fall apart if it's not comfortable. My girlfriend bought an MEC bag that seemed well made and was a good size, etc. but it simply wasn't nearly as comfortable. You really need to try them on. I recommend bringing some weights and putting them in the bag, it really helps simulate the experience and will help you figure out quickly if it fits your body well.
Good luck and have a great trip!