In context it is just speaking against swearing or making oaths: "But I say unto you, Swear not at all; neither by heaven; for it is God's throne: Nor by the earth; for it is his footstool: neither by Jerusalem; for it is the city of the great King. Neither shalt thou swear by thy head, because thou canst not make one hair white or black. But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil." (Matt. 5:34-37)
As is common, St. James says something similar: "But above all things, my brethren, swear not, neither by heaven, neither by the earth, neither by any other oath: but let your yea be yea; and your nay, nay; lest ye fall into condemnation." (James 5:12)
There are oaths in the Orthodox Church, and there were also oaths in the Bible (Ex. 22:11; Num. 5:19; Deut. 6:13; Jer. 12:16). The passage would seem to be more of a warning of rashly taking oaths, rather than an outright and total condemnation of them. It was such a rash oath that got Herod into trouble when he felt he had to behead John the Baptist (Matt. 14), an oath that cost Esau dearly (Gen. 25:29-34), and it was also with an oath that Peter denied Christ (Matt. 26:72).