I know what you asked for, but 50K is pretty big - are you just trying to max it out?
If your purpose is to get into the limit - I would guess that setting the pics to a maximum width of 500 and compression of 75 would take care of it - This is about what I use and I think that the largest image I have is like 37K.
There may be something that does what you want, but are you sure that is really what you need?
It would be a neat feature, but I have tried about 6 or 7 and don't recall ever seeing that. I am not sure the program could tell until after it compresses it - so it might have to be an iteritive process.
I can give a thumbs up to
http://www.digitaldutch.com/arles/
but it does not have that feature.