You bring up a good point. The parable of the ten virgins is sandwiched between two other parables that stress preparation by right living, not by an abundance of knowledge. (Matthew 24:45 to 25:30)
In the parable of the faithful and unfaithful servants, one servant was ready for the Lord's return because he was faithfully doing what the Lord expected of him, namely, caring for those in need, whether this need be material, spiritual, or both. The unfaithful servant not only neglected his duties, but he abused the servant who was doing the right things. It should be noted, too, that Jesus showed that a faithful slave could become unfaithful. So, the parable applies to individual Christians who must show themselves to be always ready for their Lord's return, no matter how long it takes.
The same lesson is in the parable of the virgins. The oil in the lamps doesn't represent knowledge since all ten virgins had knowledge that the Lord would return soon. The difference is that the unwise virgins had been negligent. None of the ten lamps were burning before the Lord's return since the account shows that the foolish virgins had brought along no oil at all. The oil was lit by the wise virgins when the Lord arrived. And this seems to be the same message we find in Jesus' instructions to store up treasure for ourselves in heaven where neither moth nor rust consume. Interestingly, Jesus added this thought to those instructions, "The lamp of the body is the eye. If, then your eye is simple, your whole body will be bright; but if your eye is wicked, your whole body will be dark." (Matthew 6:19-23) If we keep our lives simple and seek first God's kingdom and his righteousness, things will go well and we'll be ready for the Lord when he returns. On the other hand, if we pursue wicked works, we will fare badly. (Matthew 6:33)
If the "oil" represents anything, it would point to the holy spirit, not knowledge. In the parable that follows, Jesus showed that each Christian is expected to use wisely the talents he was given according to his own ability. The one punished was the one who hid his talent and failed to use it in service to his master. If he had God's spirit, he certainly would have used it. It is by means of the spirit that humans are transformed and enabled to prepare for the return of their Master and Bridegroom, as indicated by Isaiah 61:1; Zechariah 4:1-6; Acts 10:38; 2 Thessalonians 2:13; and many other texts.
Instead of rewarding us for knowledge, Jesus promises to bless us if we provide food, drink, hospitality, clothing, visits and care to the less fortunate whom he views as his brothers. (Matthew 25:34-40) On the other hand, storing up knowledge enough to know the Bible backwards and forwards will do us no good if we don't use our abilities to demonstrate love for our neighbors. (Matthew 25:41-46)