Optimal execution strategies in limit order books with general shape functions