Transparency with multitexturing

I apply two textures (stored with PNMImages) in a model, one over the other.
I wanna change the alpha values of the top image pixels to set transparency of some parts of this texture.

How can I configure the texture combine modes to do that?

Are you saying that your second texture is an alpha mask for the first texture?