Is it acceptable/legal to use personal software projects in work software?
Legal - yes (but)
Acceptable - maybe
One problem with being a software developer is that it is sometimes had to delineate with stuff you do for your employer and stuff you do for yourself - for example, we're defining modular package and resource structures at my work that are very similar (if not the same) to what I've been using at home, and using patterns in database models, and so on. There's always a bit of crossover.
Your situation goes a bit further than this: you have a whole library of code that you wrote outside of work (at least, I hope you did).
What you can do is licence it to your work - just the same as you would licence it to anyone else.
Be upfront about it with your management - tell them that you have already solved the problem in a personal project and can licence the library to them. If you already charge other people to licence it, then ask your company for the same consideration (on the other hand if you freely distribute under licence, then it would be churlish to ask your employer to pay for it - if you haven't yet distributed it, then you need to decide what you want to do).
Things might get sticky if you backport improvements - firstly, your licence should allow (or even expect) this to happen. Secondly, you need to ensure that improvements done on company time actually support your company directly, and are not simply improving your library for others.
Before going to your management: I would write up a plain English description of the licence you want to offer (if you're not taking an off the shelf one like GPL or MIT) and take it to a lawyer to get them to convert it to legalese. I would also see about getting the code listed on a copyright register if you can, too - or, if you're open sourcing distributing it, just whack it on a public repository.
If your company doesn't want to take the offer of licencing your library - then you want to make sure you have evidence that you already have developed the library outside of work (hence the register or public repo) - that way, when the company has paid your time to replicate your work, they can't say that you took it from them instead of the other way round.