Yes, it's possible. Let me outline how it's done, using this image from Wikimedia Commons (by ed_g2s, licensed as CC-By-SA 3.0) as an example:

Open the black and white background versions as layers of the same image (using Open as Layers... or just open both and copy-and-paste one into the other). Move the white layer above the black layer if it's not already that way. The two layers should looks something like this:

Take the difference of the layers: clone the black layer (you'll need it later), change the white layer's layer mode to "difference" and merge it down. Invert the result. This gives you the alpha channel of the original image.

If we were using an image format with pre-multiplied alpha, we'd be more or less done now. But since we aren't, we still need to de-multiply the RGB channels. To do that, clone the alpha layer we created in the previous step (or just copy it to the clipboard), set its layer mode to "divide" and merge it down with the black-background layer your cloned before step 2. The result should look like this (compare with the original black-background version to see the difference):

Now, add a layer mask to the resulting layer, select the mask and paste the alpha layer into it. The result should now look more or less like the original transparent image. Finally, to turn the mask into a proper alpha channel, you can apply it (but GIMP's PNG export will do that for you even if you don't). And there you go — one reconstructed transparent PNG ready to go:

Of course, this technique really requires that you have versions of the image on pure black and pure white backgrounds. If the backgrounds are a little bit off, similar methods may still be usable, but you may need to do additional color adjustments and the results may not be as perfect.
Ps. GIMP does also have a "Color Erase" feature (as a blend mode for the Bucket Fill tool, or as Color to Alpha... for the whole image), which is useful for reconstructing transparency when you have only one version of the image on a solid color background. However, unless used carefully, it does have a tendency to produce output that is rather more transparent than you'd probably want it to be.
Pps. If you compare the original and reconstructed images very carefully, you'll see that they're not exactly identical — some color values are off by 1/256 or so. That's because of how GIMP's "divide" layer mode works: rather than calculating the true inverse of the alpha multiplication, which would be output = (255 × input) / layer, it actually calculates output = (256 × input) / (layer + 1). This mismatch, which is ostensibly done to avoid dividing by zero, means that some of the colors may round to a slightly different value than they should. Alas, I know of no way around this, other than patching GIMP, writing a plugin to do the division the way we want it, or using some other program. Fortunately, though, the color difference is rarely if ever actually perceptible by the human eye.