Is It Safe and Allowed to Fly Pregnant?

Yes, you can fly safely at any point during pregnancy, and airlines will allow you to fly as well (sometimes with a permission slip from your care provider).  During my first pregnancy with Veda I traveled to Hungary, the Czech Republic, California, South Africa, Zambia, Zimbabwe, and Botswana (back and forth from Chicago).  My last international flight was at 32 weeks pregnant from South Africa to Chicago.  
In my current pregnancy with the second baby I have traveled to Jordan, Lebanon, South Africa, Lesotho, and back to Chicago within my first trimester (beginning at 5 weeks pregnant), and have upcoming trips to India and South Africa in my second trimester (20-26 weeks pregnant).
I personally would not want to travel after 34/35 weeks pregnant unless absolutely necessary, especially internationally.  My first was born (healthy) at 36 weeks, 5 days, and I do not want to find myself in labor on a plane.  Keep in mind that 37 weeks is considered full term, and your due date is just a guesstimate when baby might come, give or take a month.  
Flying while pregnant is completely safe as long as you are having a normal and healthy pregnancy, but any travel plans should always be discussed with your midwife or doctor. Also keep in mind that if you are going to places that require vaccinations or medications, some are not safe during pregnancy (or breastfeeding).  If you know you may be going to a country that requires proof of yellow fever vaccination, for example, if you can it would be best to get updated well before you plan on getting pregnant.
Most airlines will allow you to travel with them while pregnant.  Check which airlines (follow the link below for a global directory of airline policies) you will travel with to see if there are any restrictions or if they require a note from your midwife/ doctor to allow you to fly past a certain point in your pregnancy.  Most U.S. carriers allow you to fly while pregnant as long as you want without a medical note “at your own risk.”  Most other airlines I have flown internationally do require a medical note granting permission to fly, often beyond the second trimester (sometimes past 28 weeks, others not until past 36 weeks).  It is also wise to make several copies (or get several original copies) with permission to fly in case you are traveling on various airlines or will be having numerous trips.