Yes, you can get travel insurance even after you have purchased your flight tickets. In fact, you can do so until the day before your trip actually begins.
However, it is recommended that you buy your travel insurance as quickly as possible so that you are assured that your insurance policy will be in effect while you are on your trip. If you buy a travel insurance very close to your date of travel, there could be the threat of the paperwork not getting completed in time to cover your trip.