Under New York law, your roommate cannot file an order of protection through family court because there is no family relationship between your boyfriend and your roommate. However, your roommate could file a complaint with the Buffalo Police Department. At that point, it is within the discretion of the Erie County District Attorney and the Judge to determine if the order of protection will be granted, as well as what level is appropriate. The level of the order of protection would depend on the facts of the case.
Without any such order of protection, your roommate does not have a right to prevent your boyfriend from entering the residence. As part of your lease, you have rights as a tenant and you can certainly exercise such rights.
As an aside, it is important to consider, however, that regardless of the law, it is probably best to try to come to some sort of a compromise with your roommate. Because the law does not remedy all evils, your roommate may have enough wiggle-room within the law to make your life miserable.