Yes, this is exactly what ProGuard can do with its shrinking step. ProGuard's documentation explains how to use it. The examples are a good start.
The optimization step and the obfuscation step can further reduce the size of the program, but you can disable them if you wish (with the options -dontoptimize
and -dontobfuscate
).