It can be done, but it is often hard. Since the game is about the group, and you're the one making the oddball, you have to find a way for your PC to fit in. It's your job as a player to make a PC that fits well with the group.
The most important question is why does your PC travel and adventure with the group, and why should they allow it. If your PC has a convincing reason why working with the party serves him best, and why pursuing the party's goals is something he would do, you won't have a problem.
Evil PCs are fully capable of working well with good individuals, and literature is full of evil individuals who helped the world and had friends who were good, but there will be times you might have to show restraint because it is in your best interest.
I have two evil individuals in a party with 6 good individuals and it's no problem, but I have a rule where I always require a new PC to provide me, the DM, justification for why their PC should be a part of the groups story. The players of the two evil PCs did, and we don't have problems.
Earlier, a couple of other players made evil PCs as well, but they didn't show restraint. One pursued his interests regardless of the rest of the party's opinions, and was promptly killed by the party for killing someone they shouldn't have. The other decided he didn't want to help the party save a village, because he didn't see anything in it for him. He spent the rest of the night watching the party adventure because I wasn't going to run something just for him, and the group left him behind in the town. Since the campaign follows the group, his PC was left to obscurity without a DM to plan adventures for him. This is the sort of fate that might await you if you don't show restraint.