Tramadol is an opiod agonist of the morphine-type so you are exactly right, it can cause an addiction so be careful with withdrawal symptoms ifever you consider stopping it.
It is categorized as Pregnancy category C. Some harmful effects were noted based on animal studies, but no sufficient studies has been conducted to humans to check on that. Study on rats showed that dose of 50 mg/kg/day and the dose of 100mg/kg/day in rabbits did not cause teratogenic effects. A dose higher than 80 -140 mg/kg/day however caused some side effects such as reduction in weight and affected the bone formation. When used at the late pregnancy, high dose caused weight reduction and decrease in survival.
Safety of use in pregnancy has not been established but it can be used when the benefits outweigh the risk. Take note too that long term useof tramadol can cause addiction not only to mother but also to the baby especially when used on the late stages of pregancy.
If you are thinking to stop using it, be sure to do it gradually by tapering the dose to avoid withdrawal symptoms.
So, what safer alternatives are available tat can offer some help? If you are now on the first or second trimester of pregnancy anti-inflammatory drugs (NSAID) such as ibuprofen, indomethacin, naproxen, or ketoprofen can be used. Oral form or topical cream applications can be helpful. A combination with other analgesic acetaminophen can be of more help in relieving the pain. If really needed at times when the pain gets so severe, occasional use of narcotics such as morphine is considered safe, prolonged use of course is another story.
In addition, other conservative treatments such as warm compression on the painful areas may offer some relief. Some physiotherapy can be helpful depending on the situation of the knee. By the way, if it is really needed, your knee can be X-rayed. X-ray is not safe during pregnancy I know but there are protective shields used to protect the abdominal area when an X-ray is required on the other part s of the body.
You should discuss all your treatments with your doctor and let her/him know of all your concerns about your treatments' effects on your pregnancy.
In normal circumstances, I believe you still have long way to go to consider menopause, or even still early to consider a perimenopausal stage. If you are really in need of continuing tramadol this time, try to be cautious with the dose you are taking and perhaps you can start decreasing the dose so that you can safely get over it before the last term of pregnancy, and use other alternatives.
Please take care of your self and your baby.
Good luck and you're always welcome!