How can women be forbidden to speak and yet prophesy and speak in tongues? In 1 Corinthians 14, Paul give forbids women from speaking in church. 

1 Corinthians 14 NIV


  34 Women should remain silent in the churches. They are not allowed to
  speak, but must be in submission, as the law says. 35 If they want to
  inquire about something, they should ask their own husbands at home;
  for it is disgraceful for a woman to speak in the church.


... later


  39 Therefore, my brothers and sisters, be eager to prophesy, and do
  not forbid speaking in tongues. 40 But everything should be done in a
  fitting and orderly way.


I am assuming the word in Greek Paul is using here for church is Ecclesia, and that he wasn't, in fact, referring to a physical meeting place, or house, but rather a Christian gathering in general (but perhaps I am mistaken in this). 

I wonder how it is that he explicitly forbids them to speak "They are not allowed to speak", but then a mere four verses later he is instructing 'brothers and sisters' to be eager to prophesy, and speak in tongues. If not at Christian gatherings, then where else were they prophesying and speaking in tongues? I understand that context is probably the key here, and that things in the Corinthian church had probably gotten very much out of hand, however, It just seems strange to me that if he meant women to speak in tongues and prophesy, he would have said "They are not allowed to speak out of turn", or something to that effect.
It seems that in Corinthians some women were assuming to much in the equality and liberty that the gospel provided them. They supposed since thy were equal they could 'speak in public gatherings' as though exercising authority over others including men.  There may have been other fellowship gatherings where they could exercise gifts of prophesy such as during worship, more private discussions or teaching children, etc. It is difficult with full accuracy to recreate what the primitive church service was actually like, but there does seem to be some part of it when 'non clergy' could speak with gifts that moved them, one at a time, possibly women included.

I assume in this view that prophetic gifts (wise insights into biblical subjects which may or may, or more usually did not, include future predictions) were not seen as 'always operative on demand' as the regular teaching of a person in authority was. Rather the nature of these gifts is that they would 'come and go' like the 'wind', so when a person was 'inspired' to speak, 'allowing' them to do so, was not seen as rebellious at all. They were seen as humble people being moved by God, even 'daughters' could prophecy under this scenereo per Joel 
2:28. This respect for the inspiration of the Spirit seems to carry its own meek authority removing the concern over the pretense of 'speaking officially' as those in charge that allowed the more ecstatic impromptu sharing. This 'respect for random inspiration' is clearly seen by the fact that 'one person speaking' will 'stop and remain silent' so that another who receives inspiration can start. This switching from one to the next was regardless of the persons involved and how regularily important they may have otherwise been. (1 Corinthians 14:30).

This ancient practice of allowing people to speak in a service seems more or less lost in most churches today. In fact quite soon in the history of Christianity this practice of the ancient synagogue and more miraculous version added by the outpouring of the Holy Spirit seems to have been abandoned or in some sense possibly not Gods will in some aspects. Instead the preacher just gives a one way sermon with no opportunity for any discussion afterwards (ref this post). There are some charismatic groups that try to re-create it, or even to the more fringe movements support 'sales oriented' woman leading whole ministries, but in my experience this is often even worse and carnally based than the dry charismatic resistant churches which I confess to mostly attend as a lesser of two evils. Pray for me ;)

So one must think this 'speaking' was some kind of 'public', 'authoritative' and 'official' role which Paul did not at all grant women, nor did any other church. This is why he then says about a less private forum such as:


  If there is anything they desire to learn, let them ask their husbands at home. For it is shameful for a woman to speak in church. (1 Corinthians 14:35 ESV)


It seems a little harsh to most of us today but we should keep in mind Christianity promoted a status for women and slaves high above what was the norm while not compromising the God ordained structure of the family which most world cultures actually have little difficulty with, recognizing the need for wives to submit and husbands to love and cherish. Actually most wives do not find it that hard to submit to men who genuinely love them. The church was not meant to overthrow these house relationships once various families joined together into community under Christ as their head.