2 inch is the proper drain size for the riser and the trap of the standpipe. In addition, the drain under the floor should be at least 2 inch. The stand pipe riser should be at least 30 inches long. The biggest problem is modern washers. Modern washers have high discharges often times more than the 2 inch standpipe can take, since the horizontal section underground can only absorb water at a specific rate. A two inch pipe if its new can accept aproximately 50 gpm before it starts backing up. Your typical new washer will not exceed that on a new pipe. However if your pipe has been in the ground for years, calcium and mineral deposits can reduce the flow rate and the size. The once smooth inside surface of a drain line can become rough, forcing the water to slow down as it travels down the drain. Typically cast iron pipe has been used below ground in the basement, but that will depend on the age of your home. If your home was built after the 60s then its probably plastic. With plastic, you do not have as many problems.
But if you do have cast iron below the ground, you may have to install a laundry tub to eliminate your problem. The laundry tub stores the water and allows it to flow out at the rate the drain can absorb it.