LeBron James scored 33 points as the Los Angeles Lakers beat Detroit Pistons 135-129.