U.S. stocks closed lower in a choppy session on Wednesday, with the S&P 500 logging its fourth straight decline as investors worried about Greece's future as a member of the eurozone.