After obgyns finish residency do they have to choose a subspecialty (maternal fetal medicine, gynecology oncology)?

Yes and no. Sone decide to just be a ob/gyn. Some do become a sub spacialist by doing a fellowship in gyn onc, etc.
Subspecialty. No after finishing a four year OB/GYN residency, you do not have to chose a subspecialty such as GYN Oncology or Maternal Fetal Medicine. After residency, most people chose to practice as a general OB/GYN.
No. After residency, doctors can practice general ob/gyn or choose a subspecialty and do additional training.
They can. Subspecialization in various disciplines of the obstetrics/gynecology spectrum is certainly available as an option but is not mandatory. Most us graduates from ob/gyn residency programs actually enter private practice without any further training.

Related Questions

Fellowship in maternal-fetal medicine, can I get a fellowship in gynecologic oncology afterward?

Sure. You can do as much training as you want. You just have to be accepted into a program for it.
Yes. These are 3-year fellowships a piece so after 4 yrs of medical school, 4 yrs of residency in ob/gyn, 3 yrs of a maternal fetal medicine, if you have the time, you can apply and complete another 3-year fellowship. At some point in time however, you will need to make a living to pay off loans if you have any, and it would be difficult to maintain your certifications in two different fields.
Theoretically yes... In practice, few if any physicians can endure 11 years of training and resident pay. Additionally, most program directors would frown upon the switch in direction as a sign of personality imbalance and/or unpredictability and would be reluctant to hire you after the first fellowship without a very good reason. Given that both subspecialties are now quite competitive, I advise against trying this.
Fellowships. You can do a fellowship in a sub specialty after completing a 4 year residency in OB/GYN. A fellowship in Maternal-Fetal Medicine takes 3 years. A fellowship in Gynecological Oncology takes 3 or 4 years depending on the program. You can do a second fellowship after completing another fellowship.